<div class="widget">
	<div class="widget-header bg-blue">
		<i class="widget-icon icon-notebook"></i> 
		<span class="widget-caption"> 新增教室 </span>
		<div class="widget-buttons">
			<a href="javascript:void(0);" onclick="handlerCancel(this);" title="关闭"
				 data-toggle="dispose" data-refresh-table="#table-room"> <i class="fa fa-times"></i> </a> 
		</div>
	</div>
	<div class="widget-body">
		<!-- TODO 基本信息 -->
		<div class="widget radius-bordered mgbt-xs-10">
			<div class="widget-header">
				<i class="widget-icon icon-notebook"></i> 
				<span class="widget-caption"> 基本信息 </span>
			</div>
			<div class="widget-body editor-body-sm">
				<form class="form-horizontal form-editor form-editor-room">
					<div class="row">
						<div class="col-sm-4">
							<div class="form-group">
								<label class="col-sm-4 control-label" for="type">教室类型</label>
								<div class="col-sm-8">
									<select name="type" id="type" class="chosen-select" data-entity="com.app.miwawa.api.system.entity.config.Codec">
									</select>
								</div>
							</div>
						</div>
						<div class="col-sm-4">
							<div class="form-group">
								<label class="col-sm-4 control-label required" for="name">教室名称</label>
								<div class="col-sm-8">
									<input name="name" id="name" type="text" class="form-control" required="required">
								</div>
							</div>
						</div>
						<div class="col-sm-4">
							<div class="form-group">
								<label class="col-sm-4 control-label required" for="code">房间号</label>
								<div class="col-sm-8">
									<input name="code" id="code" type="text" class="form-control" required="required">
								</div>
							</div>
						</div>
					</div>
					<div class="row">
						<div class="col-sm-4">
							<div class="form-group">
								<label class="col-sm-4 control-label" for="area">面积</label>
								<div class="col-sm-8">
									<div class="input-group">
										<input type="text" name="area" id="area" class="form-control" />
										<span class="input-group-addon">m<sup>2</sup></span>
									</div> 
								</div>
							</div>
						</div>
						<div class="col-sm-4">
							<div class="form-group">
								<label class="col-sm-4 control-label" for="contain">容纳人数</label>
								<div class="col-sm-8">
									<div class="input-group">
										<input type="text" name="contain" id="contain" class="form-control" />
										<span class="input-group-addon">人</span>
									</div> 
								</div>
							</div>
						</div>
						<div class="col-sm-4">
							<div class="form-group">
								<label class="col-sm-4 control-label" for="remark">备注</label>
								<div class="col-sm-8">
									<input name="remark" id="remark" type="text" class="form-control"> 
								</div>
							</div>
						</div>
					</div>

					<div class="widget-footer editor-footer-sm">
						<button type="button" class="btn btn-danger btn-sm" data-toggle="tooltip" data-placement="top" title="取消" onclick="handlerCancel(this, 'editor-wrapper-open');" data-refresh-table="#table-room">
							<i class="glyphicon glyphicon-remove"></i>
						</button>
						<button type="button" class="btn btn-primary btn-sm" data-toggle="tooltip" data-placement="top" title="保存" onclick="handlerSubmit(this, '#editor-form-room', '.form-editor-room');">
							<i class="glyphicon glyphicon-ok"></i>
						</button>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>

<!-- 提交表单 ========================================================= -->
<form id="editor-form-room" action="/miwawa/{dbname}/common/save" method="post" 
			name="com.app.miwawa.api.eam.entity.Room">
			<input type="hidden" name="bean['status']" value="0">
			<input type="hidden" name="bean['invalid']" value="F">
</form>
    
<script type="text/javascript">
	jQuery(function() {
		require(['jquery.plugin.form'],function(form){
			form.chosen("#type").select("#type",{
				url:"/miwawa/default/common/select.json",
				querys: {"pcode_EQ": "c_contract_type"}
			});
			form.tooltip("[data-toggle='tooltip']");
		});
	});
</script>